//
//  RGHomeLargeCell.m
//  DuiTang--
//
//  Created by Lina Zhang on 16/10/11.
//  Copyright © 2016年 jpw. All rights reserved.
//

#import "RGHomeLargeCellVM.h"
#import "RGHomeLargeCell.h"
#import "topDateView.h"
#import "midPicView.h"
#import "textView.h"
#import "DWHomeItem.h"
@interface RGHomeLargeCell() 
@property (nonatomic, strong) topDateView *topV;
@property (nonatomic, strong) midPicView *midV;
@property (nonatomic, strong) textView *textV;
@end
@implementation RGHomeLargeCell
-(void)setFrame:(CGRect)frame{
    frame.size.height -= 7;
    [super setFrame:frame];
}
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        topDateView *topV = [topDateView topDateView];
        self.topV = topV;
        [self.contentView addSubview:topV];
        
        midPicView *midV = [midPicView midPicView];
        self.midV = midV;
        [self.contentView addSubview:midV];
        
        textView *textV = [textView textView];
        self.textV = textV;
        [self.contentView addSubview:textV];
        
        self.autoresizingMask = NO;
    }
    return self;
}
-(void)setVm:(RGHomeLargeCellVM *)vm{
    _vm = vm;
    _topV.item = vm.item;
    _topV.frame = vm.topDateViewF;
    _topV.hidden = !vm.cellIsHidden;
    _midV.item = vm.item;
    _midV.frame = vm.midPicViewF;
    _textV.item = vm.item;
    _textV.frame = vm.textViewF;
}

@end
